package wfmanage.action;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.util.DB;
import com.util.MyLog;

import edu.wfmanage.models.Claim;
import edu.wfmanage.models.User;

/**
Author: Satya Deepthi Bhagi
**/

public class displayRequest extends ActionSupport{

	private int RequestId;
	private String username="";
	
   Claim claim=new Claim();
	
	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		User user = (User) session.get("user");
		if (user == null) {
			user = new User();
		}		
		MyLog.log("\nRequest id getting from jsp is"+RequestId);
		claim = Claim.findone("select * from request where req_id= " + RequestId);
		username=user.getUsername();		
		return "claimstatus";
	}
	public int getRequestId() {
		return RequestId;
	}
	public void setRequestId(int requestId) {
		RequestId = requestId;
	}
	public Claim getClaim() {
		return claim;
	}
	public void setClaim(Claim claim) {
		this.claim = claim;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	
}
